//
//  SleepBaseViewController.swift
//  ExtremeHealth
//
//  Created by Zhongkai Li 李忠凯 on 2018/9/27.
//  Copyright © 2018 GanDongKeJi. All rights reserved.
//

class SleepBaseViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        addGradientLayer()
    }

    override var preferredStatusBarStyle: UIStatusBarStyle {
        return .lightContent
    }
    private func addGradientLayer() {
        let colorTop = UIColor("#052726").cgColor
        let colorBottom = UIColor("#023E60").cgColor

        let gradientLayer = CAGradientLayer()
        gradientLayer.frame = view.bounds
        gradientLayer.colors = [colorTop, colorBottom]
        gradientLayer.locations = [0.0, 1.0]
        view.layer.insertSublayer(gradientLayer, at: 0)
    }
}
